package top.i51213.fastaction.tuple;

import androidx.annotation.NonNull;

public class Tuple4<A,B,C,D> extends Tuple{
    public  A item1;
    public  B item2;
    public  C item3;
    public  D item4;

    public Tuple4(A a, B b, C c, D d) {
        this.item1=a;
        this.item2=b;
        this.item3=c;
        this.item4=d;
    }

    @Override
    public int dimensionCount() {
        return 4;
    }

    @Override
    public Object get(int index) {
        switch (index){
            case 1:return item1;
            case 2:return item2;
            case 3:return item3;
            case 4:return item4;
        }
        return null;
    }

    @NonNull
    @Override
    public String toString() {
        return "Tuple4{" +
                "item1=" + item1 +
                ", item2=" + item2 +
                ", item3=" + item3 +
                ", item4=" + item4 +
                '}';
    }
}
